package cn.org.book.shop.article.service.impl;

import cn.org.book.shop.article.domain.ApMaterial;
import cn.org.book.shop.article.mapper.ApMaterialMapper;
import cn.org.book.shop.article.service.IApMaterialService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


/**
 * APP用户素材Service业务层处理
 *
 * @author julywhj
 * @date 2020-11-17
 */
@Service
public class ApMaterialServiceImpl implements IApMaterialService {
    @Autowired
    private ApMaterialMapper apMaterialMapper;

    /**
     * 查询APP用户素材
     *
     * @param id APP用户素材ID
     * @return APP用户素材
     */
    @Override
    public ApMaterial selectApMaterialById(Long id) {
        return apMaterialMapper.selectApMaterialById(id);
    }

    /**
     * 查询APP用户素材列表
     *
     * @param apMaterial APP用户素材
     * @return APP用户素材
     */
    @Override
    public List<ApMaterial> selectApMaterialList(ApMaterial apMaterial) {
        return apMaterialMapper.selectApMaterialList(apMaterial);
    }

    /**
     * 新增APP用户素材
     *
     * @param apMaterial APP用户素材
     * @return 结果
     */
    @Override
    public int insertApMaterial(ApMaterial apMaterial) {
        return apMaterialMapper.insertApMaterial(apMaterial);
    }

    /**
     * 修改APP用户素材
     *
     * @param apMaterial APP用户素材
     * @return 结果
     */
    @Override
    public int updateApMaterial(ApMaterial apMaterial) {
        return apMaterialMapper.updateApMaterial(apMaterial);
    }

    /**
     * 批量删除APP用户素材
     *
     * @param ids 需要删除的APP用户素材ID
     * @return 结果
     */
    @Override
    public int deleteApMaterialByIds(Long[] ids) {
        return apMaterialMapper.deleteApMaterialByIds(ids);
    }

    /**
     * 删除APP用户素材信息
     *
     * @param id APP用户素材ID
     * @return 结果
     */
    @Override
    public int deleteApMaterialById(Long id) {
        return apMaterialMapper.deleteApMaterialById(id);
    }
}
